//
// Created by HFauto on 25-7-31.
//

#ifndef ZXMPU6500_H
#define ZXMPU6500_H

#include "zxSys.h"
#include "mpu6050.h"

#ifdef __cplusplus

class zxMpu6500 {
public:
    zxMpu6500();
    ~zxMpu6500();
    void init(gpio_num_t sda, gpio_num_t scl, int addr);
    bool runTest();
    void taskFunction();

    mpu6050_acceleration_t accel = { 0 };
    mpu6050_rotation_t rotation = { 0 };
    mpu6050_raw_acceleration_t accel_raw = { 0 };
    mpu6050_raw_rotation_t rotation_raw = { 0 };
protected:

    gpio_num_t i2c_sda;
    gpio_num_t i2c_scl;
    int i2c_addr;
    mpu6050_dev_t dev = { 0 };
};

#endif
#endif //ZXMPU6500_H
